import request from '@/utils/request'

// 资源列表
export const queryResource = (data = {}) => {
  return request({
    method: 'post',
    url: '/boss/resource/getResourcePages',
    data
  })
}

// 获取指定id的资源信息
export const getResource = (id) => {
  return request({
    method: 'get',
    url: `/boss/resource/${id}`
  })
}

// 保存或更新资源
export const resourceSaveOrUpdate = (data) => {
  return request({
    method: 'post',
    url: '/boss/resource/saveOrUpdate',
    data
  })
}

// 删除
export const deleteResource = (id) => {
  return request({
    method: 'delete',
    url: `/boss/resource/${id}`
  })
}
